from pyfeasc.utils.scamp import *

# 使用方法
if __name__ == '__main__':
	adata = sc.read_h5ad('../../data/input/anndata/GSE96583.h5ad')  # batch 列名为 "stim"
	adata.var_names_make_unique()
	
	sc.pp.filter_cells(adata, min_genes=50)
	sctm.pp.filter_genes(adata, min_cutoff=0.03, expression_cutoff_99q=1)
	sc.pp.highly_variable_genes(adata, n_top_genes=2000, flavor="seurat_v3")
	adata = adata[:, adata.var.highly_variable]
	
	topic_prop, beta = scamp(adata, method='mca', batch="stim", device="cuda:0")
	print(topic_prop.shape, beta.shape)
	print(topic_prop[0:5])
	print(beta[0:5])
